# import necessary packages
import argparse
import cv2 as cv

# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True, help="The Path to Image")
args = vars(ap.parse_args())

# load the image,display it ,and construct the list of bilateral
# filtering parameters that we are going to explore
image = cv.imread(args["image"])
cv.imshow("Original", image)
params = [(11, 21, 7), (11, 41, 21), (11, 61, 39)]

# loop over the diameter,sigma color ,and sigma space
for (diameter, sigmaColor, sigmaSpace) in params:
    # apply bilateral filtering and dispaly the image
    blurred = cv.bilateralFilter(image, diameter, sigmaColor, sigmaSpace)
    title = "Blurred d = {},sc = {},ss = {}".format(diameter, sigmaColor, sigmaSpace)
    cv.imshow(title, blurred)
    cv.waitKey(0)

